Test Series - java script

Test Number 31/92

Q: Each tab in the single web browser window is called as ____________
A. Browser Information
B. Browsing context
C. Both Browser Information & Browsing context
D. Browser Log
Solution: A single web browser window on your desktop may contain several tabs. Each tab is an independent browsing context. browser context is also defined as the environment in which the browser displays a document.
Q: Nested documents inside the HTML documents can be created using ___________
A. frame
B. nest
C. iframe
D. into
Solution: HTML documents may contain nested documents using an iframe element. An iframe creates a nested browsing context represented by a Window object of its own.
Q: How are windows, tabs, iframes, and frames treated according to client-side javascript?
A. They are all browsing contexts
B. They are all browsing information
C. They are all Window contexts
D. They are all Window objects
Solution: Client-side JavaScript makes very little distinction between windows, tabs, iframes, and frames they are all browsing contexts, and to JavaScript, they are all Window objects.
Q: How are windows, tabs, iframes, and frames treated according to javascript?
A. They are all browsing contexts
B. They are all browsing information
C. They are all Window contexts
D. They are all Window objects
Solution: Client-side JavaScript makes very little distinction between windows, tabs, iframes, and frames they are all browsing contexts, and to JavaScript, they are all Window objects.
Q: A new web browser window can be opened using which method of the Window object?
A. createtab()
B. Window.open()
C. open()
D. create()
Solution: You can open a new web browser window with the open() method of the Window object. Window.open() loads a specified URL into a new or existing window and returns the Window object that represents that window.
Q: What will happen if the first argument of open() is omitted?
A. Error Page
B. Remains in the same page
C. about:blank
D. Reloads the page
Solution: The first argument in the open function is for the url of the page which is to be opened. When the first argument of the open() is omitted, the about:blank is opened.
Q: Which object serves as the global object at the top of the scope chain?
A. Hash
B. Property
C. Element
D. Window
Solution: The Window object serves as the global object at the top of the scope chain in client-side JavaScript. All global JavaScript objects, functions, and variables automatically become members of the window object.
Q: Which is the property of a Window object that holds the name of the frame?
A. name
B. title
C. description
D. style
Solution: The name property of a Window object holds the name of the frame if it has one. This property is writable, and scripts can set it as desired. An iframe creates a nested browsing context represented by a Window object of its own.
Q: When will the fourth argument to open() useful?
A. When the second argument names a retired window
B. When the first argument names an existing window
C. When the second argument names an existing window
D. When the first argument names a retired window
Solution: The fourth argument to open() is useful only when the second argument names an existing window. This fourth argument is a boolean value that indicates whether the URL specified as the first argument should replace the current entry in the window’s browsing history (true) or create a new entry in the window’s browsing history (false). Omitting this argument is the same as passing false.
Q: The inner frame within a top-level window can be referred to as _____________
A. parent(parent)
B. parent.parent
C. parent*parent
D. parent/parent
Solution: Frames returns the window itself, which is an array-like object, listing the direct sub-frames of the current window. If a frame is contained within another frame that is contained within a top-level window, that frame can refer to the top-level window as parent.parent.

You Have Score    /10